package com.iris.live.services.data.models;

import javax.persistence.*;
import java.sql.Date;
import java.sql.Timestamp;

/**
 * Created by admin on 2017/7/23.
 */
@Entity
@Table(name = "跟进记录表", schema = "iris_dev", catalog = "")
public class 跟进记录表Model {

    private int id;
    private String 许可;
    private String 电话号码;
    private String 销售顾问;
    private Date 跟进日期;
    private String 跟进结果;
    private Timestamp 下次跟进时间;
    private String 战败原因;
    private String 战败备注;
    private String 跟进备注;
    private String 模式;
    private String 更新账号;
    private Timestamp 更新时间;
    private Integer callId;

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id", nullable = false)
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    @Basic
    @Column(name = "许可", nullable = true, length = 50)
    public String get许可() {
        return 许可;
    }

    public void set许可(String 许可) {
        this.许可 = 许可;
    }

    @Basic
    @Column(name = "电话号码", nullable = false, length = 50)
    public String get电话号码() {
        return 电话号码;
    }

    public void set电话号码(String 电话号码) {
        this.电话号码 = 电话号码;
    }

    @Basic
    @Column(name = "销售顾问", nullable = false, length = 50)
    public String get销售顾问() {
        return 销售顾问;
    }

    public void set销售顾问(String 销售顾问) {
        this.销售顾问 = 销售顾问;
    }

    @Basic
    @Column(name = "跟进日期", nullable = false)
    public Date get跟进日期() {
        return 跟进日期;
    }

    public void set跟进日期(Date 跟进日期) {
        this.跟进日期 = 跟进日期;
    }

    @Basic
    @Column(name = "跟进结果", nullable = false)
    public String get跟进结果() {
        return 跟进结果;
    }

    public void set跟进结果(String 跟进结果) {
        this.跟进结果 = 跟进结果;
    }

    @Basic
    @Column(name = "下次跟进时间", nullable = true)
    public Timestamp get下次跟进时间() {
        return 下次跟进时间;
    }

    public void set下次跟进时间(Timestamp 下次跟进时间) {
        this.下次跟进时间 = 下次跟进时间;
    }

    @Basic
    @Column(name = "战败原因", nullable = true, length = 50)
    public String get战败原因() {
        return 战败原因;
    }

    public void set战败原因(String 战败原因) {
        this.战败原因 = 战败原因;
    }

    @Basic
    @Column(name = "战败备注", nullable = true, length = 100)
    public String get战败备注() {
        return 战败备注;
    }

    public void set战败备注(String 战败备注) {
        this.战败备注 = 战败备注;
    }

    @Basic
    @Column(name = "跟进备注", nullable = true, length = 200)
    public String get跟进备注() {
        return 跟进备注;
    }

    public void set跟进备注(String 跟进备注) {
        this.跟进备注 = 跟进备注;
    }

    @Basic
    @Column(name = "模式", nullable = true)
    public String get模式() {
        return 模式;
    }

    public void set模式(String 模式) {
        this.模式 = 模式;
    }

    @Basic
    @Column(name = "更新账号", nullable = true, length = 50)
    public String get更新账号() {
        return 更新账号;
    }

    public void set更新账号(String 更新账号) {
        this.更新账号 = 更新账号;
    }

    @Basic
    @Column(name = "更新时间", nullable = true)
    public Timestamp get更新时间() {
        return 更新时间;
    }

    public void set更新时间(Timestamp 更新时间) {
        this.更新时间 = 更新时间;
    }

    @Basic
    @Column(name = "callId", nullable = true)
    public Integer getCallId() {
        return callId;
    }

    public void setCallId(Integer callId) {
        this.callId = callId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        跟进记录表Model that = (跟进记录表Model) o;

        if (id != that.id) return false;
        if (许可 != null ? !许可.equals(that.许可) : that.许可 != null) return false;
        if (电话号码 != null ? !电话号码.equals(that.电话号码) : that.电话号码 != null) return false;
        if (销售顾问 != null ? !销售顾问.equals(that.销售顾问) : that.销售顾问 != null) return false;
        if (跟进日期 != null ? !跟进日期.equals(that.跟进日期) : that.跟进日期 != null) return false;
        if (跟进结果 != null ? !跟进结果.equals(that.跟进结果) : that.跟进结果 != null) return false;
        if (下次跟进时间 != null ? !下次跟进时间.equals(that.下次跟进时间) : that.下次跟进时间 != null) return false;
        if (战败原因 != null ? !战败原因.equals(that.战败原因) : that.战败原因 != null) return false;
        if (战败备注 != null ? !战败备注.equals(that.战败备注) : that.战败备注 != null) return false;
        if (跟进备注 != null ? !跟进备注.equals(that.跟进备注) : that.跟进备注 != null) return false;
        if (模式 != null ? !模式.equals(that.模式) : that.模式 != null) return false;
        if (更新账号 != null ? !更新账号.equals(that.更新账号) : that.更新账号 != null) return false;
        if (更新时间 != null ? !更新时间.equals(that.更新时间) : that.更新时间 != null) return false;
        if (callId != null ? !callId.equals(that.callId) : that.callId != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = id;
        result = 31 * result + (许可 != null ? 许可.hashCode() : 0);
        result = 31 * result + (电话号码 != null ? 电话号码.hashCode() : 0);
        result = 31 * result + (销售顾问 != null ? 销售顾问.hashCode() : 0);
        result = 31 * result + (跟进日期 != null ? 跟进日期.hashCode() : 0);
        result = 31 * result + (跟进结果 != null ? 跟进结果.hashCode() : 0);
        result = 31 * result + (下次跟进时间 != null ? 下次跟进时间.hashCode() : 0);
        result = 31 * result + (战败原因 != null ? 战败原因.hashCode() : 0);
        result = 31 * result + (战败备注 != null ? 战败备注.hashCode() : 0);
        result = 31 * result + (跟进备注 != null ? 跟进备注.hashCode() : 0);
        result = 31 * result + (模式 != null ? 模式.hashCode() : 0);
        result = 31 * result + (更新账号 != null ? 更新账号.hashCode() : 0);
        result = 31 * result + (更新时间 != null ? 更新时间.hashCode() : 0);
        result = 31 * result + (callId != null ? callId.hashCode() : 0);
        return result;
    }
}
